@import "../../../assets/css/utils";

.page-root-category {
  height: 100% !important;

  &.skeleton {
    .head-top-search {
      @include skeleton-bgColor();
    }

    .class {
      background-color: #f5f5f5;
      opacity: 0.8;

      li {
        position: relative;

        &:after {
          content: '';
          position: absolute;
          left: 50%;
          top: 50%;
          transform: translate(-50%, -50%);
          width: 60%;
          height: 40%;
          @include skeleton-bgColor();
        }
      }
    }

    .banner {
      @include skeleton-bgColor();
    }

    .skeleton.list {
      .icon-wrap {
        @include skeleton-bgColor();
      }

      p {
        width: 80%;
        margin: 0 auto;
        @include skeleton-bgColor();
        height: 30px;
      }
    }
  }

  .main {
    flex: 1;
    display: flex;
    height: 100%;
    padding-top: $search-top-height;
  }

  .class {
    height: 100%;
    background-color: #fffaf8;
    overflow: scroll;
    width: 200px;

    li {
      width: 200px;
      height: 100px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-left: 2px solid transparent;
      color: #999999;
      font-size: 30px;

      &.is-selected {
        transition-duration: 200ms;
        background-color: #fff;
        color: #2e2e2e;
        font-size: 32px;
        border-left-color: #fb4f54;
      }
    }
  }

  .content {
    flex: 1;
    height: 100%;
  }

  .van-pull-refresh {
    height: 100%;
    overflow: scroll;
  }

  .product-list {
    padding: 25px;
    height: 100%;
    overflow: scroll;

    .none-data {
      text-align: center;
      color: #999;
      padding: 20px;
      font-size: 32px;
    }

    .banner {
      width: 500px;
      height: 300px;
      border-radius: 6px;
      margin-bottom: 12px;
      overflow: hidden !important;

      img {
        margin: 0 auto;
        border-radius: 6px;
        width: 500px;
        height: 300px;
      }
    }

    .list {
      overflow: hidden;

      li {
        float: left;
        text-align: center;
        width: 33.33%;
        padding: 20px;
      }

      .icon-wrap {
        min-height: 120px;
        max-height: 160px;
        overflow: hidden;
        margin-bottom: 12px;
      }

      img {
        margin: 0 auto;
        border-radius: 6px;
        width: 88px;
        margin-bottom: 20px;
      }

      p {
        padding: 0 6px;
        color: #999999;
        font-size: 24px;
        text-overflow: ellipsis;
        white-space: nowrap;
        word-wrap: normal;
        width: 100%;
        overflow: hidden;
      }
    }
  }
}
